2 Scenarios > 2.14 Security > 2.14.5 Configuring SIM card lock ("SC")

2.14.5
This section comprises the subsections Description, Used AT Commands, Flow Chart, Hints and Example. To move to these subsections please use the Navigation Frame or the appropri­ate buttons on the toolbar.
2.14.5.1
This chapter describes how to set or remove a SIM card lock. If the SIM card is locked, the user will be required to enter SIM PIN1 every time the mobile is started.
To configure the SIM card lock, the SIM PIN1 must be at hand. Only three attempts are allowed. The command AT^SPIC can be used to view the number of left attempts. Use AT+CLCK=”SC”,2 or AT^SLCK=”SC”,2 to request the current state. To lock or unlock the SIM card use the commands AT+CLCK=”SC”,<mode>,<PIN> or AT^SLCK=”SC”,<mode>,<PIN>, where <mode>=1 sets the lock and <mode>=0 deactivates it.
It is recommended to check the status of the SIM PIN authentication at first. If the read com­mand AT+CPIN? returns the response "+CPIN: SIM PUK", no changes can be made until the PUK was entered.
2.14.5.2
For further details about the commands see [2].
2.14.5.3
Figure 126: Configuring SIM card lock ("SC") – part 1
Figure 127: Configuring SIM card lock ("SC") – part 2
2.14.5.4
•
2.14.5.5
***************************************
Comment: Configuring SIM card lock ("SC")
***************************************
***************************************
Comment: Request PIN status.
***************************************
 
Subscr 1 Send: AT+CPIN?
Subscr 1 Receive: AT+CPIN?
Subscr 1 Receive: +CPIN: READY
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Request PIN counter.
***************************************
 
Subscr 1 Send: AT^SPIC
Subscr 1 Receive: AT^SPIC
Subscr 1 Receive: ^SPIC: 3
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Which PIN is required (read command is not supported by all products).
***************************************
 
Subscr 1 Send: AT^SPIC?
Subscr 1 Receive: AT^SPIC?
Subscr 1 Receive: ^SPIC: SIM PIN2
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Request status of SIM card lock (+CLCK: 0= lock is inactive).
***************************************
 
Subscr 1 Send: AT+CLCK=SC,2
Subscr 1 Receive: AT+CLCK=SC,2
Subscr 1 Receive: +CLCK: 0
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Try to set SIM card lock with wrong PIN.
***************************************
 
Subscr 1 Send: AT+CLCK=SC,1,5555
Subscr 1 Receive: AT+CLCK=SC,1,5555
Subscr 1 Receive: +CME ERROR: incorrect password
 
***************************************
Comment: Which PIN is required (read command is not supported by all products).
***************************************
 
Subscr 1 Send: AT^SPIC?
Subscr 1 Receive: AT^SPIC?
Subscr 1 Receive: ^SPIC: SIM PIN2
Subscr 1 Receive:
Subscr 1 Receive: OK
***************************************
Comment: Request PIN counter.
***************************************
 
Subscr 1 Send: AT^SPIC
Subscr 1 Receive: AT^SPIC
Subscr 1 Receive: ^SPIC: 3
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Set SIM card lock.
***************************************
 
Subscr 1 Send: AT+CLCK=SC,1,0000
Subscr 1 Receive: AT+CLCK=SC,1,0000
Subscr 1 Receive: OK
 
***************************************
Comment: Request status of SIM card lock (+CLCK: 1= lock is active).
***************************************
 
Subscr 1 Send: AT+CLCK=SC,2
Subscr 1 Receive: AT+CLCK=SC,2
Subscr 1 Receive: +CLCK: 1
Subscr 1 Receive:
Subscr 1 Receive: OK
 
***************************************
Comment: Remove SIM card lock.
***************************************
 
Subscr 1 Send: AT^SLCK=SC,0,0000
Subscr 1 Receive: AT^SLCK=SC,0,0000
Subscr 1 Receive: OK
 
***************************************
Comment: Request status of SIM card lock (+CLCK: 0= lock is inactive).
***************************************
 
Subscr 1 Send: AT+CLCK=SC,2
Subscr 1 Receive: AT+CLCK=SC,2
Subscr 1 Receive: +CLCK: 0
Subscr 1 Receive:
Subscr 1 Receive: OK